{include file="public/header" /}
<style>

    .current {
        color: red !important;
    }


    .layim-menu-box li {
        position: relative;
        line-height: 22px;
        padding-left: 30px;
        font-size: 12px
    }

    .layim-menu-box li cite {
        padding-right: 5px;
        font-size: 14px
    }

    .layim-menu-box li i {
        display: none;
        position: absolute;
        left: 8px;
        top: 0;
        font-weight: 700;
        color: #5FB878
    }

    .layim-menu-box .layim-this i {
        display: block
    }

    .layim-menu-box li:hover {
        background-color: #eee
    }


    .layui-layim-tab li {
        position: relative;
        width: 33.33%;
        height: 24px;
        line-height: 24px;
        font-size: 22px;
        text-align: center;
        color: #666;
        color: rgba(0, 0, 0, .6);
        cursor: pointer
    }

    .layim-tab-two li {
        width: 50%
    }


    .layui-layim-tab li:hover {
        opacity: .8;
        filter: Alpha(opacity=80)
    }


    .layim-tab-content li h5 {
        position: relative;
        margin-right: 15px;
        padding-left: 30px;
        height: 28px;
        line-height: 28px;
        cursor: pointer;
        font-size: 0;
        white-space: nowrap;
        overflow: hidden
    }

    .layim-tab-content li h5 * {
        font-size: 14px
    }

    .layim-tab-content li h5 span {
        max-width: 125px
    }

    .layim-tab-content li h5 i {
        position: absolute;
        left: 12px;
        top: 0;
        color: #C9BDBB
    }

    .layim-tab-content li h5 em {
        padding-left: 5px;
        color: #999
    }

    .layim-tab-content li h5[lay-type=true] i {
        top: 2px
    }

    .layim-tab-content li ul {
        display: none;
        margin-bottom: 10px
    }

    .layui-layim-list li {
        position: relative;
        height: 42px;
        padding: 5px 15px 5px 60px;
        font-size: 0;
        cursor: pointer
    }

    .layui-layim-list li:hover {
        background-color: #F2F2F2;
        background-color: rgba(0, 0, 0, .05)
    }

    .layui-layim-list li * {
        display: inline-block;
        *display: inline;
        *zoom: 1;
        vertical-align: top;
        font-size: 14px
    }

    .layui-layim-list li span {
        margin-top: 4px;
        max-width: 155px
    }

    .layui-layim-list li img {
        position: absolute;
        left: 15px;
        top: 8px;
        width: 36px;
        height: 36px;
        border-radius: 100%
    }

    .layui-layim-list li p {
        display: block;
        padding-right: 30px;
        line-height: 18px;
        font-size: 12px;
        color: #999
    }


    .layui-layim-tool li {
        position: relative;
        width: 48px;
        height: 37px;
        line-height: 40px;
        text-align: center;
        font-size: 22px;
        cursor: pointer
    }

    .layui-layim-tool li:active {
        background-color: #e2e2e2
    }

    .layim-tool-msgbox span {
        display: none;
        position: absolute;
        left: 12px;
        top: -12px;
        height: 20px;
        line-height: 20px;
        padding: 0 10px;
        border-radius: 2px;
        background-color: #33DF83;
        color: #fff;
        font-size: 12px;
        -webkit-animation-duration: 1s;
        animation-duration: 1s
    }


    .layui-layim-search input {
        width: 210px;
        padding: 0 30px 0 10px;
        height: 30px;
        line-height: 30px;
        border: none;
        border-radius: 3px;
        background-color: #ddd
    }

    .layui-layim-search label {
        position: absolute;
        right: 6px;
        top: 4px;
        font-size: 20px;
        cursor: pointer;
        color: #333;
        font-weight: 400
    }


    .layui-layim-skin li {
        margin: 0 10px 10px 0;
        line-height: 60px;
        text-align: center;
        background-color: #f6f6f6
    }

    .layui-layim-skin li, .layui-layim-skin li img {
        width: 86px;
        height: 60px;
        cursor: pointer
    }

    .layui-layim-skin li img:hover {
        opacity: .8;
        filter: Alpha(opacity=80)
    }

    .layui-layim-skin li cite {
        font-size: 14px;
        font-style: normal
    }

    .layim-chat-list li *, .layui-layim-min .layui-layer-content * {
        display: inline-block;
        *display: inline;
        *zoom: 1;
        vertical-align: top;
        font-size: 14px
    }


    .layim-chat-list li img, .layui-layim-min .layui-layer-content img {
        width: 40px;
        height: 40px;
        border-radius: 100%
    }


    .layim-chat-list li {
        white-space: nowrap
    }

    .layim-chat-list li span, .layui-layim-min .layui-layer-content span {
        width: 100px;
        padding-left: 10px;
        font-size: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

    .layim-chat-list li span cite {
        color: #999;
        padding-left: 10px
    }

    .layim-chat-list li:hover {
        background-color: #E2E2E2
    }

    .layim-chat-system span {
        display: inline-block;
        line-height: 30px;
        padding: 0 15px;
        border-radius: 3px;
        background-color: #e2e2e2;
        cursor: default;
        font-size: 14px
    }


    .layim-chat-other img {
        position: absolute;
        left: 0;
        top: 0;
        width: 50px;
        height: 50px;
        border-radius: 100%
    }


    .layim-chat-group .layim-chat-other .layim-chat-username em {
        padding: 0 10px;
        color: #999
    }

    .layim-chat-main {
        height: 492px;
        padding: 15px 15px 5px;
        overflow-x: hidden;
        overflow-y: auto
    }

    .layim-chat-main ul li {
        position: relative;
        font-size: 0;
        margin-bottom: 10px;
        padding-left: 60px;
        min-height: 68px
    }

    .layim-chat-text, .layim-chat-user {
        display: inline-block;
        *display: inline;
        *zoom: 1;
        vertical-align: top;
        font-size: 14px
    }

    .layim-chat-user {
        position: absolute;
        left: 3px
    }

    .layim-chat-user img {
        width: 40px;
        height: 40px;
        border-radius: 100%
    }

    .layim-chat-user cite {
        position: absolute;
        left: 60px;
        top: -2px;
        width: 500px;
        line-height: 24px;
        font-size: 12px;
        white-space: nowrap;
        color: #999;
        text-align: left;
        font-style: normal
    }

    .layim-chat-user cite i {
        padding-left: 15px;
        font-style: normal
    }

    .layim-chat-text {
        position: relative;
        line-height: 22px;
        margin-top: 25px;
        padding: 8px 15px;
        background-color: #e2e2e2;
        border-radius: 3px;
        color: #333;
        word-break: break-all;
        max-width: 462px \9
    }

    .layim-chat-text:after {
        content: '';
        position: absolute;
        left: -10px;
        top: 13px;
        width: 0;
        height: 0;
        border-style: solid dashed dashed;
        border-color: #e2e2e2 transparent transparent;
        overflow: hidden;
        border-width: 10px
    }

    .layim-chat-text a {
        color: #33DF83
    }

    .layim-chat-text img {
        max-width: 100%;
        vertical-align: middle
    }


    .layui-layim-file i {
        font-size: 80px;
        line-height: 80px
    }

    .layui-layim-file cite {
        display: block;
        line-height: 20px;
        font-size: 14px
    }


    .layui-layim-audio p {
        margin-top: 3px
    }


    .layim-chat-main ul .layim-chat-mine {
        text-align: right;
        padding-left: 0;
        padding-right: 60px
    }

    .layim-chat-mine .layim-chat-user {
        left: auto;
        right: 3px
    }

    .layim-chat-mine .layim-chat-user cite {
        left: auto;
        right: 60px;
        text-align: right
    }

    .layim-chat-mine .layim-chat-user cite i {
        padding-left: 0;
        padding-right: 15px
    }

    .layim-chat-mine .layim-chat-text {
        margin-left: 0;
        text-align: left;
        background-color: #5FB878;
        color: #fff
    }

    .layim-chat-mine .layim-chat-text:after {
        left: auto;
        right: -10px;
        border-top-color: #5FB878
    }

    .layim-chat-mine .layim-chat-text a {
        color: #fff
    }

    .layim-chat-footer {
        border-top: 1px solid #F1F1F1
    }


    .layim-chat-tool span {
        position: relative;
        margin: 0 10px;
        display: inline-block;
        *display: inline;
        *zoom: 1;
        vertical-align: top;
        font-size: 24px;
        cursor: pointer
    }

    .layim-tool-log i {
        position: relative;
        top: 2px;
        margin-right: 5px;
        font-size: 20px;
        color: #999
    }

    .layim-tool-image input {
        position: absolute;
        font-size: 0;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        opacity: .01;
        filter: Alpha(opacity=1);
        cursor: pointer
    }


    .layui-layim-face ul {
        position: relative;
        width: 372px;
        padding: 10px;
        border: 1px solid #D9D9D9;
        background-color: #fff;
        box-shadow: 0 0 20px rgba(0, 0, 0, .2)
    }

    .layui-layim-face ul li {
        cursor: pointer;
        float: left;
        border: 1px solid #e8e8e8;
        height: 22px;
        width: 26px;
        overflow: hidden;
        margin: -1px 0 0 -1px;
        padding: 4px 2px;
        text-align: center
    }

    .layui-layim-face ul li:hover {
        position: relative;
        z-index: 2;
        border: 1px solid #eb7350;
        background: #fff9ec
    }

    .layim-chat-textarea {
        margin-left: 10px
    }

    .layim-chat-textarea textarea {
        display: block;
        width: 100%;
        padding: 5px 0 0;
        height: 68px;
        line-height: 20px;
        border: none;
        overflow: auto;
        resize: none;
        background: 0 0
    }

    .layim-chat-textarea textarea:focus {
        outline: 0
    }

    .layim-chat-bottom {
        position: relative;
        height: 46px
    }

    .layim-chat-send {
        position: absolute;
        right: 15px;
        top: 3px;
        height: 32px;
        line-height: 32px;
        font-size: 0;
        cursor: pointer
    }

    .layim-chat-send span {
        display: inline-block;
        *display: inline;
        *zoom: 1;
        vertical-align: top;
        font-size: 14px;
        line-height: 32px;
        margin-left: 5px;
        padding: 0 20px;
        background-color: #5FB878;
        color: #fff;
        border-radius: 3px
    }

    .layim-chat-send span:hover {
        background-color: #69BC80
    }

    .layim-chat-send span:active {
        background-color: #59B573
    }

    .layim-chat-send .layim-send-btn {
        border-radius: 3px 0 0 3px
    }


    .layim-chat-send .layim-menu-box li {
        padding-right: 15px;
        line-height: 28px
    }


    .layui-layim-close .layui-layer-content span {
        width: auto;
        max-width: 120px
    }


    .layui-layim-members ul {
        position: relative;
        width: 578px;
        height: 200px;
        padding: 10px 10px 0;
        border: 1px solid #D9D9D9;
        background-color: #fff;
        background-color: rgba(255, 255, 255, .9);
        box-shadow: none;
        overflow: hidden;
        font-size: 0
    }

    .layui-layim-members ul:hover {
        overflow: auto
    }


    .layui-layim-members li {
        width: 112px;
        margin: 10px 0;
        text-align: center
    }

    .layui-layim-members li a {
        position: relative;
        display: inline-block;
        max-width: 100%
    }

    .layui-layim-members li a:after {
        content: '';
        position: absolute;
        width: 46px;
        height: 46px;
        left: 50%;
        margin-left: -23px;
        top: 0;
        border: 1px solid #eee;
        border-color: rgba(0, 0, 0, .1);
        border-radius: 100%
    }

    .layui-layim-members li img {
        width: 48px;
        height: 48px;
        border-radius: 100%
    }

    .layui-layim-members li:hover {
        opacity: .9
    }

    .layui-layim-members li a cite {
        display: block;
        padding: 0 3px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap
    }


    .layui-layim-contextmenu li {
        padding: 0 15px 0 35px;
        cursor: pointer;
        line-height: 30px
    }

    .layui-layim-contextmenu li:hover {
        background-color: #F2F2F2
    }


    .layim-add-img img, .layim-add-remark p {
        margin-bottom: 10px
    }


    .layim-add-img img {
        width: 100px;
        height: 100px
    }


</style>
<body>
<div class="layui-fluid layui-anim-fadein">
    <div class="layui-card">
        <div class="layim-chat-main">
            <ul id="LAY_view">
                {foreach name="list" item="vo"}
                <li>
                    <div class="layim-chat-user">
                        <img src="/static/admin/images/default.png">
                        <cite>{$vo.user.code}<i>{$vo.create_time}</i></cite></div>
                    <div class="layim-chat-text {if $vo.id == $id}current{/if}">{$vo.comment}</div>
                </li>
                {if $vo.images}
                <li>
                    <div class="layim-chat-text" style="margin-top: 2px;">
                        <a href="{$vo.images}" target="_blank"><img  src="{$vo.images}" style="width: 100px;"></a>
                    </div>
                </li>
                {/if}
                {if $vo.rcomment}
                <li class="layim-chat-mine">
                    <div class="layim-chat-user">
                        <img src="/static/admin/images/default.png">
                        <cite><i>{:date('Y-m-d H:i:s',$vo.reply_time)}</i>{$vo.admin_name}</cite></div>
                    <div class="layim-chat-text">{$vo.rcomment}</div>
                </li>
                {/if}
                {/foreach}
            </ul>
        </div>

        <div class="layim-chat-footer">

            <div class="layim-chat-textarea">
                <textarea id="content"></textarea>
            </div>
            <div class="layim-chat-bottom">
                <div class="layim-chat-send">
                    <span class="layim-send-btn">回复</span>
                </div>
            </div>
        </div>
    </div>
    <p style="color: red">*Tips:标红的为会员本次留言内容</p>
</div>
</body>
{include file="public/footer" /}

<script>
    layui.use(['jquery', 'notify'], function () {
        var $ = layui.jquery, notify = layui.notify;
        notify.init();
        $('.layim-chat-main').scrollTop($('.layim-chat-main')[0].scrollHeight);
        $('.layim-chat-send').click(function () {
            var content = $("#content").val();
            if (!content) {
                layer.msg('请填写回复内容');
                return false;
            }
            var load = layer.load();
            $.ajax({
                type: 'POST',
                url: "{:url('save')}",
                data: {id: '{$id}', rcomment: content},
                dataType: "json",
                success: function (data) {
                    layer.close(load);
                    if (data.code == 1) {
                        notify.success(data.msg, 1500, function () {
                            location.reload();
                        });
                    } else {
                        notify.error(data.msg);
                    }
                }
            });
        });
    });

</script>
</html>